import {
  ApplicationConfig,
  provideExperimentalZonelessChangeDetection,
} from '@angular/core';
import { provideRouter } from '@angular/router';

import { routes } from './app.routes';
import { AbsInfoService } from './interface';
import { SuccessInfoService } from './success-info.service';
import { ErrorInfoService } from './error-info.service';

export const appConfig: ApplicationConfig = {
  providers: [
    // provideZoneChangeDetection({ eventCoalescing: true }),
    provideExperimentalZonelessChangeDetection(),
    provideRouter(routes),
    {
      provide: AbsInfoService,
      useClass: SuccessInfoService,
      multi: true,
    },
    {
      provide: AbsInfoService,
      useClass: ErrorInfoService,
      multi: true,
    },
  ],
};
